﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="emailWC.ascx.cs" Inherits="MadeInPortugalWebApplication.WebControl.emailWC" %>

<section id="page">
<asp:UpdatePanel ID="ProductListUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <script type="text/javascript">
        function CngImage(obj) {
            index = obj.selectedIndex;
            if (index < 1) { return; }
            src = "/Flags/" + obj.options[index].value + ".gif";
            $('.imagem1').attr("src", src);
//            document.getElementById('imgCountryFlag').src = "~/Flags/" + obj.options[index].value + ".gif";
        }  

</script>
    <table width="100%">
        <tr>
            <td style="width:"15%">
                &nbsp;</td>
            <td style="width:15%;text-align:right">
                <span style="color:Red">*</span>To: </td>
            <td 60%"="" style="width:">
                <asp:Label ID="lblTo" runat="server" Text=""></asp:Label>
            </td>
            <td style="width:"15%">
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                <span style="color:Red">*</span>Subject: </td>
            <td>
                <asp:TextBox ID="tbxSubject" Width="50%" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="tbxSubject" ErrorMessage="Subject Missing"><asp:Image runat="server" 
                    src="../Style/img/error.png" ToolTip="Mandatory field" width="20px" /></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td style="vertical-align:top" align="right">
                <span style="color:Red">*</span>Content: </td>
            <td style="vertical-align:top">
                <asp:TextBox ID="tbxContent" Width="60%" runat="server" Rows="6" TextMode="MultiLine"></asp:TextBox>
                <asp:RequiredFieldValidator style="vertical-align:top" ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="tbxContent" ErrorMessage="Contente Missing"><asp:Image runat="server" 
                    src="../Style/img/error.png" ToolTip="Mandatory field" width="20px" /></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td colspan="2" >
                Please fill your contact informartio</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td>
                <asp:Label ID="lblVisitorsIP" runat="server" Text="lblVisitorsIP"></asp:Label>
                <asp:Label ID="lblVisitorsIP0" runat="server" Text="lblVisitorsIP"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                Country/Region:</td>
            <td>
                <asp:DropDownList ID="ddlCountries" runat="server" onchange="CngImage(this);">
                </asp:DropDownList >
                &nbsp;<img id="imagem1" class="imagem1" runat="server" src="" alt="" />
                
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                <span style="color:Red">*</span>Full Name: </td>
            <td>
                <asp:TextBox ID="tbxName" runat="server" Width="40%"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="tbxName" ErrorMessage="Full Name Missing"><asp:Image runat="server" src="../Style/img/error.png" width="20px" ToolTip="Mandatory field" /></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                <span style="color:Red">*</span>Email: </td>
            <td>
                <asp:TextBox ID="tbxEmail" runat="server" Width="40%"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ErrorMessage="Invalid Format" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ControlToValidate="tbxEmail"><asp:Image ID="Image2" 
                runat="server" src="../Style/img/error.png" ToolTip="Incorrect email" 
                width="20px" /></asp:RegularExpressionValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                <span style="color:Red">*</span>Company name: </td>
            <td>
                <asp:TextBox ID="tbxCompany" runat="server" Width="40%"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="tbxName" ErrorMessage="Full Name Missing"><asp:Image runat="server" 
                    src="../Style/img/error.png" ToolTip="Mandatory field" width="20px" /></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                <span style="color:Red">*</span>Phone number: </td>
            <td>
                <asp:TextBox ID="tbxIndicativoPais" runat="server" MaxLength="3" Width="30px"></asp:TextBox>
                <asp:TextBox ID="tbxIndicativo" runat="server" MaxLength="5" Width="60px"></asp:TextBox>
                <asp:TextBox ID="tbxPhone" runat="server" MaxLength="7" Width="100px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="tbxPhone" ErrorMessage="Phone Number Missing"><asp:Image runat="server" 
                    src="../Style/img/error.png" ToolTip="Mandatory field" width="20px" /></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                Fax: </td>
            <td>
                <asp:TextBox ID="tbxIndicativoPaisFax" runat="server" MaxLength="3" Width="30px"></asp:TextBox>
                <asp:TextBox ID="tbxIndicativoFax" runat="server" MaxLength="5" Width="60px"></asp:TextBox>
                <asp:TextBox ID="tbxPhoneFax" runat="server" MaxLength="7" Width="100px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td><p class="buttons">
                <asp:LinkButton ID="lblAddTag" runat="server" CssClass="button" onclick="lblAddTag_Click">
                                <span>Send E-mail</span>
                            </asp:LinkButton> 
                    <%--<span>ou</span> <a href="#" class="cancel">Cancelar</a>--%>
                   </p>
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <div class="feedback">
           <div runat="server" id="feedbackPanel">
           </div>
       </div>
                        
    </ContentTemplate>
 </asp:UpdatePanel>
 </section>
